package my.study.java.util.Hashtable;

import java.util.Hashtable;

public class HashTableEx01 {

	/**
	 * Hashtable is synchronized
	 * neither the key nor the value can be null
	 * @param args
	 */
	public static void main(String[] args) {
		Hashtable<String, Integer> hashTable = new Hashtable<String, Integer>();
		try {
			hashTable.put("", null);
		} catch (Exception e) {
			pl("Neither the key nor the value can be null");
		}
		assert 0 == hashTable.size();
		pl("but HashTable is synchronized.");
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
}
